package com.qf.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultMsg {

    private int code;
    private String msg;
    private Object data;

    public static ResultMsg SUCCESS(){
        return new ResultMsg(200,null,null);
    }

    public static ResultMsg SUCCESS(Object data){
        return new ResultMsg(200,null,data);
    }

    public static ResultMsg ERROR(int code){
        return new ResultMsg(code,null,null);
    }

    public static ResultMsg ERROR(int code,String msg){
        return new ResultMsg(code,msg,null);
    }
}
